home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (October 1991)
/
HamCall (Whitehall Publishing)(1991).bin
/
prgming
/
ada
/
cas2.pro
< prev
next >
Wrap
Text File
|
1987-10-19
|
3KB
|
63 lines
-------- SIMTEL20 Ada Software Repository Prologue ------------
--
-- Unit name : COUNT_OF_ADA_STATEMENTS_2
-- Version : 1.0
-- Author : Richard Conn
-- : TI Ada Technology Branch
-- : Box 801, MS 8007
-- : McKinney, TX 75069
-- DDN Address : RCONN at SIMTEL20
-- Derivation : COUNT_OF_ADA_STATEMENTS by Bill Whitaker
-- Date created : 14 Feb 85
-- Release date : 15 Feb 85
-- Last update : 15 Feb 85
--
---------------------------------------------------------------
--
-- Keywords : Source analysis, Quantity, Statements
--
----------------:
--
-- Abstract :
-- This procedure calculates the "STATEMENTS" of a valid Ada fragment
-- specified by a FILE_NAME string parameter. It need not be a complete
-- compilation unit, but it should have closed all open parens and
-- strings.
--
-- The Ada statement is defined by a semicolon terminator
-- outside of comments, parentheses, or string or character literals.
-- This definition is insensitive to formatting or layout of the source.
--
-- There are exotic cases for which this will misestimate the count
-- but we have never encountered one in real code.
--
-- This procedure is derived from Bill Whitaker's original
-- COUNT_OF_ADA_STATEMENTS, and it does not change his original algorithm.
-- It adds a line count and a character-checksum hash (sum of POS values of
-- all non-space characters in the file mod 256).
--
------------------ Revision history ---------------------------
--
-- DATE VERSION AUTHOR HISTORY
-- 19850215 1.0 R Conn Initial Release
--
------------------ Distribution and Copyright -----------------
--
-- This software is released to the Public Domain (note:
-- software released to the Public Domain is not subject
-- to copyright protection).
--
------------------ Disclaimer ---------------------------------
--
-- This software and its documentation are provided "AS IS" and
-- without any expressed or implied warranties whatsoever.
-- No warranties as to performance, merchantability, or fitness
-- for a particular purpose exist.
--
-- In no event shall any person or organization of people be
-- held responsible for any direct, indirect, consequential
-- or inconsequential damages or lost profits.
--
-------------------END-PROLOGUE--------------------------------